package com.github.limit.handler;

import com.github.limit.entity.CurrentLimit;
import org.springframework.web.method.HandlerMethod;

import javax.servlet.http.HttpServletRequest;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.List;

/**
 * @author: wangdejun
 * @create: 2019-10-11 17:14
 **/
public interface LimitHandler<T extends Annotation> {


    /**
     * 责任链处理接口
     *
     * @param t
     * @param method
     * @return
     */
    boolean handler(T t, Method method);

    /**
     * 限流数据
     *
     * @return
     */
    List<? extends CurrentLimit> limitList();
}
